/**
 * 
 */
package com.ms.service.module.baccarat.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.ms.service.module.baccarat.BacrHistoryTrendParser;
import com.xpec.c4.db.model.log.basic.BasicLogModel;

/**
 * 百家樂遊戲記錄
 * 
 * @author TW15010
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
@Table(name = "bacr_gamelog")
//@org.hibernate.annotations.Table(
//		appliesTo = "bacr_gamelog", indexes =
//		{
//				@org.hibernate.annotations.Index(name = "IDX_ROUND", columnNames = { "roundNumber","tableId"}),
//				@org.hibernate.annotations.Index(name = "IDX_TIME", columnNames = { "eventTime","tableId"}),
//		}
//)
public class BacrGameLogModel extends BasicLogModel {
	private static final long serialVersionUID = -2535945459239973927L;

	/**
	 * 牌桌id
	 */
	private String tableId;

	/**
	 * 局號
	 */
	private String roundNumber;

	/**
	 * 這一靴的第幾鋪
	 */
	private int hand;

	/**
	 * 這一鋪結束時牌靴剩下的牌
	 */
	private String cardInShoe;

	/**
	 * 是否有出現紅卡
	 */
	private boolean haveRedCard;

	/**
	 * 閒家手上的牌
	 */
	private String playerCards;

	/**
	 * 莊家手上的牌
	 */
	private String bankerCards;

	/**
	 * 總押
	 */
	private long totalBet;

	/**
	 * 總得
	 */
	private long totalScore;

	/**
	 * 勝負歷史記錄
	 */
	private String resultHistory;

	/**
	 * 押閒金額
	 */
	private long betPlayer;

	/**
	 * 押莊金額
	 */
	private long betBanker;

	/**
	 * 押和金額
	 */
	private long betTie;

	/**
	 * 押閒對金額
	 */
	private long betPlayerPair;

	/**
	 * 押莊對金額
	 */
	private long betBankerPair;

	/**
	 * 這一鋪第一張銷掉的牌
	 */
	private String firstDiscard;

	/**
	 * 銷牌階段銷掉的牌
	 */
	private String discards;

	/**
	 * 勝負結果
	 */
	private String result;

	/**
	 * 勝負結果 (閒對)
	 */
	private boolean rPlayerPair;

	/**
	 * 勝負結果 (莊對)
	 */
	private boolean rBankerPair;

	/**
	 * 玩家押注人數
	 */
	private int playerBetCount;

	/**
	 * 機器人押注人數
	 */
	private int robotBetCount;
	
	/**
	 * 活動連勝得分金額
	 */
	private long totalActivityCombosScore;

	/**
	 * 押注送到 dc 處理的次數
	 */
	private int betToDcCount;

	/**
	 * 成功押注的次數
	 */
	private int betSuccessCount;

	/**
	 * 當前莊閒<br>
	 * {@link BacrHistoryTrendParser#getCurWinnerType()}
	 */
	private int curWinnerType;

	/**
	 * 當前莊閒連局數<br>
	 * {@link BacrHistoryTrendParser#getCurWinnerComboLength()}
	 */
	private int curWinnerComboLength;

	public String getRoundNumber() {
		return roundNumber;
	}

	public void setRoundNumber(String roundNumber) {
		this.roundNumber = roundNumber;
	}

	/**
	 * 1 副牌的 log 長度為 159<br>
	 * 30副的長度約為4770
	 * 
	 * @return
	 */
	@Column(columnDefinition = "VARCHAR(5000) default ''")
	public String getCardInShoe() {
		return cardInShoe;
	}

	public void setCardInShoe(String cardInShoe) {
		this.cardInShoe = cardInShoe;
	}

	public boolean isHaveRedCard() {
		return haveRedCard;
	}

	public void setHaveRedCard(boolean haveRedCard) {
		this.haveRedCard = haveRedCard;
	}

	public String getPlayerCards() {
		return playerCards;
	}

	public void setPlayerCards(String playerCards) {
		this.playerCards = playerCards;
	}

	public String getBankerCards() {
		return bankerCards;
	}

	public void setBankerCards(String bankerCards) {
		this.bankerCards = bankerCards;
	}

	public long getTotalBet() {
		return totalBet;
	}

	public void setTotalBet(long totalBet) {
		this.totalBet = totalBet;
	}

	public long getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(long totalScore) {
		this.totalScore = totalScore;
	}

	/**
	 * 一副牌 54 張, 假設最大利用限度 4 張一舖牌, 可以玩 54/4=13 鋪<br>
	 * 30副牌, 30*13=390 鋪<br>
	 * 一舖牌的歷史記錄 log 長度為 10 字元<br>
	 * 總共就是 10*390=3900
	 * 
	 * @return
	 */
	@Column(columnDefinition = "VARCHAR(4000) default ''")
	public String getResultHistory() {
		return resultHistory;
	}

	public void setResultHistory(String resultHistory) {
		this.resultHistory = resultHistory;
	}

	public long getBetPlayer() {
		return betPlayer;
	}

	public void setBetPlayer(long betPlayer) {
		this.betPlayer = betPlayer;
	}

	public long getBetBanker() {
		return betBanker;
	}

	public void setBetBanker(long betBanker) {
		this.betBanker = betBanker;
	}

	public long getBetTie() {
		return betTie;
	}

	public void setBetTie(long betTie) {
		this.betTie = betTie;
	}

	public long getBetPlayerPair() {
		return betPlayerPair;
	}

	public void setBetPlayerPair(long betPlayerPair) {
		this.betPlayerPair = betPlayerPair;
	}

	public long getBetBankerPair() {
		return betBankerPair;
	}

	public void setBetBankerPair(long betBankerPair) {
		this.betBankerPair = betBankerPair;
	}

	public String getFirstDiscard() {
		return firstDiscard;
	}

	public void setFirstDiscard(String firstDiscard) {
		this.firstDiscard = firstDiscard;
	}

	public String getDiscards() {
		return discards;
	}

	public void setDiscards(String discards) {
		this.discards = discards;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public boolean isrPlayerPair() {
		return rPlayerPair;
	}

	public void setrPlayerPair(boolean rPlayerPair) {
		this.rPlayerPair = rPlayerPair;
	}

	public boolean isrBankerPair() {
		return rBankerPair;
	}

	public void setrBankerPair(boolean rBankerPair) {
		this.rBankerPair = rBankerPair;
	}

	public int getHand() {
		return hand;
	}

	public void setHand(int hand) {
		this.hand = hand;
	}

	public String getTableId() {
		return tableId;
	}

	public void setTableId(String tableId) {
		this.tableId = tableId;
	}

	public int getPlayerBetCount() {
		return playerBetCount;
	}

	public void setPlayerBetCount(int playerBetCount) {
		this.playerBetCount = playerBetCount;
	}

	public int getRobotBetCount() {
		return robotBetCount;
	}

	public void setRobotBetCount(int robotBetCount) {
		this.robotBetCount = robotBetCount;
	}

	public long getTotalActivityCombosScore() {
		return totalActivityCombosScore;
	}

	public void setTotalActivityCombosScore(long totalActivityCombosScore) {
		this.totalActivityCombosScore = totalActivityCombosScore;
	}

	public int getBetToDcCount() {
		return betToDcCount;
	}

	public void setBetToDcCount(int betToDcCount) {
		this.betToDcCount = betToDcCount;
	}

	public int getBetSuccessCount() {
		return betSuccessCount;
	}

	public void setBetSuccessCount(int betSuccessCount) {
		this.betSuccessCount = betSuccessCount;
	}

	public int getCurWinnerType() {
		return curWinnerType;
	}

	public void setCurWinnerType(int curWinnerType) {
		this.curWinnerType = curWinnerType;
	}

	public int getCurWinnerComboLength() {
		return curWinnerComboLength;
	}

	public void setCurWinnerComboLength(int curWinnerComboLength) {
		this.curWinnerComboLength = curWinnerComboLength;
	}
}
